#include <iostream>
using namespace std;
int fact(int n)
{
	if (n == 0)
		return 1;
	else
	{
		return n * fact(n - 1);
	}
}
int main()
{
	int n = 0;
	cin >> n;
	int r = fact(n);
	cout << r;
	return 0;
}